package org.huntaway.kindergarten.manager;

import java.util.List;

import org.huntaway.kernel.NutException;
import org.huntaway.kindergarten.po.TeacherGroup;
import org.huntaway.kindergarten.util.EnumUse;

public class TeacherGroupMng extends BaseMng<TeacherGroup>{
	@SuppressWarnings("unchecked")
	public List<TeacherGroup> getTeacherGroup() {		
		return dateManage.findbyhql("from TeacherGroup").list();
	}
	public void save(TeacherGroup item) {
		item.setIsuse(EnumUse.NO.getValue());
		//updateEntityUse(item);
		super.save(item);
	}
	public void delete(TeacherGroup item) throws NutException {
		if(item.getIsuse().intValue()==EnumUse.YES.getValue()){
			throwException(item);
		}
		super.delete(item);
	}
}
